﻿using FluentNHibernate.Mapping;

namespace HashFoo.Nhib
{
    /// <summary>
    /// Helper functions for FluentNHibernate
    /// </summary>
    public static class FluentNhibernateExtensions
    {
        /// <summary>
        /// Sets the length of a property mapping to 10000, forcing it to "max"
        /// </summary>
        /// <param name="part"></param>
        /// <returns></returns>
        public static PropertyPart MaxSize(this PropertyPart part)
        {
            // hack to force mapping to varchar(max)
            return part.Length(10000);
        }
    }
}
